﻿<%@ Page Language="C#" MasterPageFile="~/MasterPagePopup.master" AutoEventWireup="true" CodeFile="CheckInModal.aspx.cs" Inherits="FE_CheckInModal" Title="Check In" %>
<%@ Register Src="~/UserControl/CustomerDetails.ascx" TagName="CustomerDetails" TagPrefix="uc" %>
<%@ Register Src="~/UserControl/CheckInDetails.ascx" TagName="CheckInDetails" TagPrefix="uc" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ModalContent" Runat="Server">
    <uc:CustomerDetails runat="server" ID="uxCustomerDetails" />
    <div class="section-separator"></div>    
    <uc:CheckInDetails runat="server" ID="uxCheckInDetails" />
    <div class="section-separator"></div>
    
    <gr:ContainerButton ID="ContainerButton1" runat="server">
        <gr:LinkButton ID="uxCheckIn" runat="server" SizeType="FixedSmallShort" Text="Check In" OnClientClick="return validateToCheckIn();"
            CssClassIcon="icon_checkin" OnClick="uxCheckIn_Click"></gr:LinkButton>
        <gr:LinkButton ID="uxSaveBook" runat="server" SizeType="FixedSmallShort" Text="Lưu" OnClientClick="return ValidateCustomerInfo();"
            CssClassIcon="icon_save" OnClick="uxSaveBook_Click"></gr:LinkButton>        
        <gr:LinkButton ID="uxCancelBook" runat="server" SizeType="FixedSmallShort" Text="Hủy" OnClientClick="return validateToCancel();"
            CssClassIcon="icon_cancel" OnClick="uxCancelBook_Click"></gr:LinkButton>
        <gr:LinkButton ID="uxClose" runat="server" SizeType="FixedSmallShort" Text="Đóng"
            CssClassIcon="icon_delete" OnClientClick="return parent.ClosePopupModal(1)"></gr:LinkButton>
    </gr:ContainerButton>
    <script type="text/javascript">
        function validateToCancel()
        {
            var msg_confirm = '<%=Resources.MessageManager.ConfirmToCancelBooking %>';            
            var confirmed = confirm(msg_confirm);
            return confirmed;
        }
        function validateToCheckIn()
        {
            if(!ValidateCustomerInfo())
                return false;
            else 
                return validateRooms();
        }
    </script>
</asp:Content>

